/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Product
关于产品基本信息操作的相关接口

OpenAPI spec version: v2
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKIothub/IothubApiModel.h>


@implementation IothubImportThingModelRequest
-(id) initWithRegion:(NSString *)regionId
thingModel:(NSObject*)thingModel
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.thingModel = thingModel;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
thingModel:(NSObject*)thingModel
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.thingModel = thingModel;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self thingModel])
    {
        [result setValue:[self thingModel] forKey:@"thingModel"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.thingModel = [dictionary objectForKey:@"thingModel"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubExportThingModelResult
-(id) initWithThingModel:(NSObject*) thingModel { 
    self.thingModel = thingModel;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self thingModel])
    {
        [result setValue:[self thingModel] forKey:@"thingModel"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.thingModel = [dictionary objectForKey:@"thingModel"];
    return self;
} 

@end
@implementation IothubExportThingModelRequest
-(id) initWithRegion:(NSString *)regionId
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubAddDeviceResult
-(id) initWithDeviceName:(NSString*) deviceName
        identifier:(NSString*)identifier
        secret:(NSString*)secret { 
    self.deviceName = deviceName;               
    self.identifier = identifier;               
    self.secret = secret;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self deviceName])
    {
        [result setValue:[self deviceName] forKey:@"deviceName"];
    }
    if([self identifier])
    {
        [result setValue:[self identifier] forKey:@"identifier"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceName = [dictionary objectForKey:@"deviceName"];
    self.identifier = [dictionary objectForKey:@"identifier"];
    self.secret = [dictionary objectForKey:@"secret"];
    return self;
} 

@end
@implementation IothubQueryDeviceDetailResult
-(id) initWithDeviceId:(NSString*) deviceId
        deviceName:(NSString*)deviceName
        parentId:(NSString*)parentId
        deviceType:(NSString*)deviceType
        status:(NSNumber*)status
        productKey:(NSString*)productKey
        identifier:(NSString*)identifier
        secret:(NSString*)secret
        descriptionValue:(NSString*)descriptionValue
        activatedTime:(NSNumber*)activatedTime
        lastConnectedTime:(NSNumber*)lastConnectedTime
        createdTime:(NSNumber*)createdTime
        updatedTime:(NSNumber*)updatedTime
        productName:(NSString*)productName
        model:(NSString*)model
        manufacturer:(NSString*)manufacturer { 
    self.deviceId = deviceId;               
    self.deviceName = deviceName;               
    self.parentId = parentId;               
    self.deviceType = deviceType;               
    self.status = status;               
    self.productKey = productKey;               
    self.identifier = identifier;               
    self.secret = secret;               
    self.descriptionValue = descriptionValue;               
    self.activatedTime = activatedTime;               
    self.lastConnectedTime = lastConnectedTime;               
    self.createdTime = createdTime;               
    self.updatedTime = updatedTime;               
    self.productName = productName;               
    self.model = model;               
    self.manufacturer = manufacturer;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self deviceId])
    {
        [result setValue:[self deviceId] forKey:@"deviceId"];
    }
    if([self deviceName])
    {
        [result setValue:[self deviceName] forKey:@"deviceName"];
    }
    if([self parentId])
    {
        [result setValue:[self parentId] forKey:@"parentId"];
    }
    if([self deviceType])
    {
        [result setValue:[self deviceType] forKey:@"deviceType"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    if([self identifier])
    {
        [result setValue:[self identifier] forKey:@"identifier"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self activatedTime])
    {
        [result setValue:[self activatedTime] forKey:@"activatedTime"];
    }
    if([self lastConnectedTime])
    {
        [result setValue:[self lastConnectedTime] forKey:@"lastConnectedTime"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self model])
    {
        [result setValue:[self model] forKey:@"model"];
    }
    if([self manufacturer])
    {
        [result setValue:[self manufacturer] forKey:@"manufacturer"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceId = [dictionary objectForKey:@"deviceId"];
    self.deviceName = [dictionary objectForKey:@"deviceName"];
    self.parentId = [dictionary objectForKey:@"parentId"];
    self.deviceType = [dictionary objectForKey:@"deviceType"];
    self.status = [dictionary objectForKey:@"status"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    self.identifier = [dictionary objectForKey:@"identifier"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.activatedTime = [dictionary objectForKey:@"activatedTime"];
    self.lastConnectedTime = [dictionary objectForKey:@"lastConnectedTime"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    self.productName = [dictionary objectForKey:@"productName"];
    self.model = [dictionary objectForKey:@"model"];
    self.manufacturer = [dictionary objectForKey:@"manufacturer"];
    return self;
} 

@end
@implementation IothubInvokeThingServiceRequest
-(id) initWithRegion:(NSString *)regionId
name:(NSString*)name
input:(NSObject*)input
identifier:(NSString*)identifier
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.name = name;
    self.input = input;
    self.identifier = identifier;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
name:(NSString*)name
input:(NSObject*)input
identifier:(NSString*)identifier
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.name = name;
    self.input = input;
    self.identifier = identifier;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self input])
    {
        [result setValue:[self input] forKey:@"input"];
    }
    if([self identifier])
    {
        [result setValue:[self identifier] forKey:@"identifier"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.input = [dictionary objectForKey:@"input"];
    self.identifier = [dictionary objectForKey:@"identifier"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubDescribeThingShadowRequest
-(id) initWithRegion:(NSString *)regionId
identifier:(NSString*)identifier
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.identifier = identifier;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
identifier:(NSString*)identifier
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.identifier = identifier;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self identifier])
    {
        [result setValue:[self identifier] forKey:@"identifier"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.identifier = [dictionary objectForKey:@"identifier"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubQueryDevicePageRequest
-(id) initWithRegion:(NSString *)regionId
deviceName:(NSString*)deviceName
status:(NSNumber*)status
productKey:(NSString*)productKey
deviceType:(NSNumber*)deviceType
nowPage:(NSNumber*)nowPage
pageSize:(NSNumber*)pageSize
order:(NSString*)order
direction:(NSString*)direction
parentId:(NSString*)parentId { 
    self.regionId = regionId;
    self.deviceName = deviceName;
    self.status = status;
    self.productKey = productKey;
    self.deviceType = deviceType;
    self.nowPage = nowPage;
    self.pageSize = pageSize;
    self.order = order;
    self.direction = direction;
    self.parentId = parentId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
deviceName:(NSString*)deviceName
status:(NSNumber*)status
productKey:(NSString*)productKey
deviceType:(NSNumber*)deviceType
nowPage:(NSNumber*)nowPage
pageSize:(NSNumber*)pageSize
order:(NSString*)order
direction:(NSString*)direction
parentId:(NSString*)parentId { 
    self.regionId = regionId;
    self.version = version;
    self.deviceName = deviceName;
    self.status = status;
    self.productKey = productKey;
    self.deviceType = deviceType;
    self.nowPage = nowPage;
    self.pageSize = pageSize;
    self.order = order;
    self.direction = direction;
    self.parentId = parentId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self deviceName])
    {
        [result setValue:[self deviceName] forKey:@"deviceName"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    if([self deviceType])
    {
        [result setValue:[self deviceType] forKey:@"deviceType"];
    }
    if([self nowPage])
    {
        [result setValue:[self nowPage] forKey:@"nowPage"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self order])
    {
        [result setValue:[self order] forKey:@"order"];
    }
    if([self direction])
    {
        [result setValue:[self direction] forKey:@"direction"];
    }
    if([self parentId])
    {
        [result setValue:[self parentId] forKey:@"parentId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceName = [dictionary objectForKey:@"deviceName"];
    self.status = [dictionary objectForKey:@"status"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    self.deviceType = [dictionary objectForKey:@"deviceType"];
    self.nowPage = [dictionary objectForKey:@"nowPage"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.order = [dictionary objectForKey:@"order"];
    self.direction = [dictionary objectForKey:@"direction"];
    self.parentId = [dictionary objectForKey:@"parentId"];
    return self;
} 

@end
@implementation IothubRemoveDeviceByIdRequest
-(id) initWithRegion:(NSString *)regionId
deviceId:(NSString*)deviceId { 
    self.regionId = regionId;
    self.deviceId = deviceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
deviceId:(NSString*)deviceId { 
    self.regionId = regionId;
    self.version = version;
    self.deviceId = deviceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self deviceId])
    {
        [result setValue:[self deviceId] forKey:@"deviceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceId = [dictionary objectForKey:@"deviceId"];
    return self;
} 

@end
@implementation IothubQueryDeviceDetailRequest
-(id) initWithRegion:(NSString *)regionId
deviceName:(NSString*)deviceName
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.deviceName = deviceName;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
deviceName:(NSString*)deviceName
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.deviceName = deviceName;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self deviceName])
    {
        [result setValue:[self deviceName] forKey:@"deviceName"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceName = [dictionary objectForKey:@"deviceName"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubAddDeviceRequest
-(id) initWithRegion:(NSString *)regionId
deviceName:(NSString*)deviceName
productKey:(NSString*)productKey
model:(NSString*)model
manufacturer:(NSString*)manufacturer
descriptionValue:(NSString*)descriptionValue { 
    self.regionId = regionId;
    self.deviceName = deviceName;
    self.productKey = productKey;
    self.model = model;
    self.manufacturer = manufacturer;
    self.descriptionValue = descriptionValue;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
deviceName:(NSString*)deviceName
productKey:(NSString*)productKey
model:(NSString*)model
manufacturer:(NSString*)manufacturer
descriptionValue:(NSString*)descriptionValue { 
    self.regionId = regionId;
    self.version = version;
    self.deviceName = deviceName;
    self.productKey = productKey;
    self.model = model;
    self.manufacturer = manufacturer;
    self.descriptionValue = descriptionValue;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self deviceName])
    {
        [result setValue:[self deviceName] forKey:@"deviceName"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    if([self model])
    {
        [result setValue:[self model] forKey:@"model"];
    }
    if([self manufacturer])
    {
        [result setValue:[self manufacturer] forKey:@"manufacturer"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceName = [dictionary objectForKey:@"deviceName"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    self.model = [dictionary objectForKey:@"model"];
    self.manufacturer = [dictionary objectForKey:@"manufacturer"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    return self;
} 

@end
@implementation IothubDescribeThingShadowResult
-(id) initWithState:(NSObject*) state
        metadata:(NSObject*)metadata
        version:(NSNumber*)version
        timestamp:(NSNumber*)timestamp { 
    self.state = state;               
    self.metadata = metadata;               
    self.version = version;               
    self.timestamp = timestamp;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self state])
    {
        [result setValue:[self state] forKey:@"state"];
    }
    if([self metadata])
    {
        [result setValue:[self metadata] forKey:@"metadata"];
    }
    if([self version])
    {
        [result setValue:[self version] forKey:@"version"];
    }
    if([self timestamp])
    {
        [result setValue:[self timestamp] forKey:@"timestamp"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.state = [dictionary objectForKey:@"state"];
    self.metadata = [dictionary objectForKey:@"metadata"];
    self.version = [dictionary objectForKey:@"version"];
    self.timestamp = [dictionary objectForKey:@"timestamp"];
    return self;
} 

@end
@implementation IothubInvokeThingServiceResult
-(id) initWithMsgId:(NSString*) msgId { 
    self.msgId = msgId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self msgId])
    {
        [result setValue:[self msgId] forKey:@"msgId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.msgId = [dictionary objectForKey:@"msgId"];
    return self;
} 

@end
@implementation IothubUpdateThingShadowRequest
-(id) initWithRegion:(NSString *)regionId
state:(NSObject*)state
identifier:(NSString*)identifier
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.state = state;
    self.identifier = identifier;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
state:(NSObject*)state
identifier:(NSString*)identifier
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.state = state;
    self.identifier = identifier;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self state])
    {
        [result setValue:[self state] forKey:@"state"];
    }
    if([self identifier])
    {
        [result setValue:[self identifier] forKey:@"identifier"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.state = [dictionary objectForKey:@"state"];
    self.identifier = [dictionary objectForKey:@"identifier"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubUpdateDeviceRequest
-(id) initWithRegion:(NSString *)regionId
model:(NSString*)model
manufacturer:(NSString*)manufacturer
descriptionValue:(NSString*)descriptionValue
status:(NSNumber*)status
deviceId:(NSString*)deviceId { 
    self.regionId = regionId;
    self.model = model;
    self.manufacturer = manufacturer;
    self.descriptionValue = descriptionValue;
    self.status = status;
    self.deviceId = deviceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
model:(NSString*)model
manufacturer:(NSString*)manufacturer
descriptionValue:(NSString*)descriptionValue
status:(NSNumber*)status
deviceId:(NSString*)deviceId { 
    self.regionId = regionId;
    self.version = version;
    self.model = model;
    self.manufacturer = manufacturer;
    self.descriptionValue = descriptionValue;
    self.status = status;
    self.deviceId = deviceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self model])
    {
        [result setValue:[self model] forKey:@"model"];
    }
    if([self manufacturer])
    {
        [result setValue:[self manufacturer] forKey:@"manufacturer"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self deviceId])
    {
        [result setValue:[self deviceId] forKey:@"deviceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.model = [dictionary objectForKey:@"model"];
    self.manufacturer = [dictionary objectForKey:@"manufacturer"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.status = [dictionary objectForKey:@"status"];
    self.deviceId = [dictionary objectForKey:@"deviceId"];
    return self;
} 

@end
@implementation IothubRemoveDeviceRequest
-(id) initWithRegion:(NSString *)regionId
deviceName:(NSString*)deviceName
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.deviceName = deviceName;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
deviceName:(NSString*)deviceName
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.deviceName = deviceName;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self deviceName])
    {
        [result setValue:[self deviceName] forKey:@"deviceName"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.deviceName = [dictionary objectForKey:@"deviceName"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubCreateProductResult
-(id) initWithProductKey:(NSString*) productKey { 
    self.productKey = productKey;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubDescribeProductRequest
-(id) initWithRegion:(NSString *)regionId
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubUpdateProductRequest
-(id) initWithRegion:(NSString *)regionId
productName:(NSString*)productName
productDescription:(NSString*)productDescription
dynamicRegister:(NSNumber*)dynamicRegister
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.productName = productName;
    self.productDescription = productDescription;
    self.dynamicRegister = dynamicRegister;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
productName:(NSString*)productName
productDescription:(NSString*)productDescription
dynamicRegister:(NSNumber*)dynamicRegister
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.productName = productName;
    self.productDescription = productDescription;
    self.dynamicRegister = dynamicRegister;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self productDescription])
    {
        [result setValue:[self productDescription] forKey:@"productDescription"];
    }
    if([self dynamicRegister])
    {
        [result setValue:[self dynamicRegister] forKey:@"dynamicRegister"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.productName = [dictionary objectForKey:@"productName"];
    self.productDescription = [dictionary objectForKey:@"productDescription"];
    self.dynamicRegister = [dictionary objectForKey:@"dynamicRegister"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubDeleteProductRequest
-(id) initWithRegion:(NSString *)regionId
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubDescribeProductResult
-(id) initWithProductName:(NSString*) productName
        productType:(NSNumber*)productType
        productKey:(NSString*)productKey
        productSecret:(NSString*)productSecret
        createdTime:(NSNumber*)createdTime
        deviceCount:(NSNumber*)deviceCount
        dynamicRegister:(NSNumber*)dynamicRegister
        productDescription:(NSString*)productDescription
        templateName:(NSString*)templateName { 
    self.productName = productName;               
    self.productType = productType;               
    self.productKey = productKey;               
    self.productSecret = productSecret;               
    self.createdTime = createdTime;               
    self.deviceCount = deviceCount;               
    self.dynamicRegister = dynamicRegister;               
    self.productDescription = productDescription;               
    self.templateName = templateName;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self productType])
    {
        [result setValue:[self productType] forKey:@"productType"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    if([self productSecret])
    {
        [result setValue:[self productSecret] forKey:@"productSecret"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self deviceCount])
    {
        [result setValue:[self deviceCount] forKey:@"deviceCount"];
    }
    if([self dynamicRegister])
    {
        [result setValue:[self dynamicRegister] forKey:@"dynamicRegister"];
    }
    if([self productDescription])
    {
        [result setValue:[self productDescription] forKey:@"productDescription"];
    }
    if([self templateName])
    {
        [result setValue:[self templateName] forKey:@"templateName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.productName = [dictionary objectForKey:@"productName"];
    self.productType = [dictionary objectForKey:@"productType"];
    self.productKey = [dictionary objectForKey:@"productKey"];
    self.productSecret = [dictionary objectForKey:@"productSecret"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.deviceCount = [dictionary objectForKey:@"deviceCount"];
    self.dynamicRegister = [dictionary objectForKey:@"dynamicRegister"];
    self.productDescription = [dictionary objectForKey:@"productDescription"];
    self.templateName = [dictionary objectForKey:@"templateName"];
    return self;
} 

@end
@implementation IothubCreateProductRequest
-(id) initWithRegion:(NSString *)regionId
productName:(NSString*)productName
productType:(NSNumber*)productType
productDescription:(NSString*)productDescription
templateId:(NSString*)templateId { 
    self.regionId = regionId;
    self.productName = productName;
    self.productType = productType;
    self.productDescription = productDescription;
    self.templateId = templateId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
productName:(NSString*)productName
productType:(NSNumber*)productType
productDescription:(NSString*)productDescription
templateId:(NSString*)templateId { 
    self.regionId = regionId;
    self.version = version;
    self.productName = productName;
    self.productType = productType;
    self.productDescription = productDescription;
    self.templateId = templateId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self productType])
    {
        [result setValue:[self productType] forKey:@"productType"];
    }
    if([self productDescription])
    {
        [result setValue:[self productDescription] forKey:@"productDescription"];
    }
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.productName = [dictionary objectForKey:@"productName"];
    self.productType = [dictionary objectForKey:@"productType"];
    self.productDescription = [dictionary objectForKey:@"productDescription"];
    self.templateId = [dictionary objectForKey:@"templateId"];
    return self;
} 

@end
  
@implementation IothubExportThingModelResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubExportThingModelResult* result = [[IothubExportThingModelResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubExportThingModelResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubListProductAbilitiesResult
-(id) initWithPage:(PageinfoVO*) page
        abilities:(NSArray<ProductAbility*>*)abilities { 
    self.page = page;               
    self.abilities = abilities;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self page])
    {
        [result setValue:[[self page] dictionary]forKey:@"page"];
    }
    if([self abilities])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self abilities] count]; i++) {
            ProductAbility* item = [[self abilities] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"abilities"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.page = [[PageinfoVO alloc]initWithDic:[dictionary objectForKey:@"page"]];
    NSArray* abilitiesArray = [dictionary objectForKey:@"abilities"];
    if(abilitiesArray&&![abilitiesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [abilitiesArray count];i++)
        {
        ProductAbility* item = [[ProductAbility alloc]initWithDic:[abilitiesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.abilities = propertyArray;
    }
    return self;
} 

@end
@implementation IothubListProductAbilitiesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    self.productKey = productKey;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters
productKey:(NSString*)productKey { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    self.productKey = productKey;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self productKey])
    {
        [result setValue:[self productKey] forKey:@"productKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    self.productKey = [dictionary objectForKey:@"productKey"];
    return self;
} 

@end
@implementation IothubImportThingModelResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation IothubListProductAbilitiesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubListProductAbilitiesResult* result = [[IothubListProductAbilitiesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubListProductAbilitiesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubImportThingModelResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubImportThingModelResult* result = [[IothubImportThingModelResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubImportThingModelResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubQueryDevicePageResult
-(id) initWithPageSize:(NSNumber*) pageSize
        nowPage:(NSNumber*)nowPage
        totalSize:(NSNumber*)totalSize
        totalPage:(NSNumber*)totalPage
        data:(NSArray<DeviceVO*>*)data { 
    self.pageSize = pageSize;               
    self.nowPage = nowPage;               
    self.totalSize = totalSize;               
    self.totalPage = totalPage;               
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self nowPage])
    {
        [result setValue:[self nowPage] forKey:@"nowPage"];
    }
    if([self totalSize])
    {
        [result setValue:[self totalSize] forKey:@"totalSize"];
    }
    if([self totalPage])
    {
        [result setValue:[self totalPage] forKey:@"totalPage"];
    }
    if([self data])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self data] count]; i++) {
            DeviceVO* item = [[self data] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.nowPage = [dictionary objectForKey:@"nowPage"];
    self.totalSize = [dictionary objectForKey:@"totalSize"];
    self.totalPage = [dictionary objectForKey:@"totalPage"];
    NSArray* dataArray = [dictionary objectForKey:@"data"];
    if(dataArray&&![dataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataArray count];i++)
        {
        DeviceVO* item = [[DeviceVO alloc]initWithDic:[dataArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.data = propertyArray;
    }
    return self;
} 

@end
@implementation IothubRemoveDeviceResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation IothubDescribeThingShadowResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubDescribeThingShadowResult* result = [[IothubDescribeThingShadowResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubDescribeThingShadowResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubUpdateDeviceResult
-(id) initWithDevice:(DeviceVO*) device { 
    self.device = device;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self device])
    {
        [result setValue:[[self device] dictionary]forKey:@"device"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.device = [[DeviceVO alloc]initWithDic:[dictionary objectForKey:@"device"]];
    return self;
} 

@end
  
@implementation IothubUpdateDeviceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubUpdateDeviceResult* result = [[IothubUpdateDeviceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubUpdateDeviceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubRemoveDeviceByIdResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation IothubRemoveDeviceByIdResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubRemoveDeviceByIdResult* result = [[IothubRemoveDeviceByIdResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubRemoveDeviceByIdResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubAddDeviceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubAddDeviceResult* result = [[IothubAddDeviceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubAddDeviceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubQueryDevicePageResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubQueryDevicePageResult* result = [[IothubQueryDevicePageResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubQueryDevicePageResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubQueryDeviceDetailResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubQueryDeviceDetailResult* result = [[IothubQueryDeviceDetailResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubQueryDeviceDetailResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubUpdateThingShadowResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation IothubUpdateThingShadowResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubUpdateThingShadowResult* result = [[IothubUpdateThingShadowResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubUpdateThingShadowResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubInvokeThingServiceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubInvokeThingServiceResult* result = [[IothubInvokeThingServiceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubInvokeThingServiceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubRemoveDeviceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubRemoveDeviceResult* result = [[IothubRemoveDeviceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubRemoveDeviceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubListProductsResult
-(id) initWithPage:(PageinfoVO*) page
        products:(NSArray<Product*>*)products { 
    self.page = page;               
    self.products = products;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self page])
    {
        [result setValue:[[self page] dictionary]forKey:@"page"];
    }
    if([self products])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self products] count]; i++) {
            Product* item = [[self products] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"products"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.page = [[PageinfoVO alloc]initWithDic:[dictionary objectForKey:@"page"]];
    NSArray* productsArray = [dictionary objectForKey:@"products"];
    if(productsArray&&![productsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [productsArray count];i++)
        {
        Product* item = [[Product alloc]initWithDic:[productsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.products = propertyArray;
    }
    return self;
} 

@end
@implementation IothubUpdateProductResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation IothubDescribeProductResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubDescribeProductResult* result = [[IothubDescribeProductResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubDescribeProductResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubDeleteProductResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation IothubUpdateProductResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubUpdateProductResult* result = [[IothubUpdateProductResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubUpdateProductResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubCreateProductResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubCreateProductResult* result = [[IothubCreateProductResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubCreateProductResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation IothubListProductsRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
  
@implementation IothubDeleteProductResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubDeleteProductResult* result = [[IothubDeleteProductResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubDeleteProductResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation IothubListProductsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
IothubListProductsResult* result = [[IothubListProductsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(IothubListProductsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
